using MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;
using MinimalistFoodStreet.BackEnd.Infrastructure.Dtos.Response.Tables;
using MinimalistFoodStreet.BackEnd.Infrastructure.Tools;

namespace MinimalistFoodStreet.BackEnd.Server.Server.ResponseExtend.Tables 
{
	public static class VarifysEnitityExtend 
	{
		public static ResponseVarifysDto ToResponseDto(this Varify entity)
		{
			return new ResponseVarifysDto ()
			{

					id = entity.VId,
					code = entity.VCode,
					phone = entity.VPhone,
					outTime = entity.VOutTime,
					outTimeStr = Tools.TimeToString(entity.VOutTime),
					isUsed = entity.VIsUsed,
					useTime = entity.VUseTime,
					useTimeStr = Tools.TimeToString(entity.VUseTime),
					createTime = entity.VCreateTime,
					createTimeStr = Tools.TimeToString(entity.VCreateTime),
					updateTime = entity.VUpdateTime,
					updateTimeStr = Tools.TimeToString(entity.VUpdateTime),
			};
		}
	}
}